package com.fowo.api.controller.handleWork;


import com.fowo.api.common.model.R;
import com.fowo.api.model.funds.pay.order.FundsPayOrderVo;
import com.fowo.api.service.handleWork.FundsPayOrderPaymentService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

@Tag(name = "付款")
@RequestMapping("/api/funds-pay-order/payment")
@RestController
public class FundsPayOrderPaymentController {
    @Resource
    private FundsPayOrderPaymentService service;

    @PreAuthorize("@am.canAccess('fundsPayOrderPayment')")
    @Operation(summary = "付款")
    @PostMapping
    public R payment(@RequestBody FundsPayOrderVo model) {
        return R.run(() -> service.payment(model));
    }
}
